<template>
    <ul class="todo-main">
		<!-- todoObj是遍历出来的对象
			  遍历的数组是todos
			 todoObj.id 是 遍历出来的id
		-->
        <MyItem
            v-for="todoObj in todos"
            :key="todoObj.id"
            :todo="todoObj"
            :checkTodo="checkTodo"
            :deleteTodo="deleteTodo"
        />
    </ul>
    
</template>

<script>
import  MyItem  from './MyItem.vue'

export default {
    name:'MyList',
    components: {MyItem},
    props:['todos','checkTodo','deleteTodo']
}
</script>


<style scoped>
	/*main*/
	.todo-main {
		margin-left: 0px;
		border: 1px solid #ddd;
		border-radius: 2px;
		padding: 0px;
	}

	.todo-empty {
		height: 40px;
		line-height: 40px;
		border: 1px solid #ddd;
		border-radius: 2px;
		padding-left: 5px;
		margin-top: 10px;
	}
</style>